<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');
    $router->resource('commodity', CommodityController::class);
    $router->resource('banners', BannerController::class);
    $router->resource('coins', CoinController::class);
    $router->resource('conversions', ConversionsController::class);
    $router->resource('notices', NoticesController::class);
    $router->resource('orders', OrdersController::class);
    $router->resource('recharges', RechargesController::class);
    $router->resource('users', UsersController::class);
    $router->resource('withdraws', WithdrawsController::class);
    $router->resource('send-income', SendIncomesController::class);
    $router->resource('detail', DetailController::class);
    $router->resource('user-log', UserLogController::class);
    $router->resource('news', NewsController::class);
    $router->resource('customer', CustomerController::class);
    $router->resource('retail', RetailController::class);
    $router->resource('Commoditytypes', CommoditytypeController::class);

    $router->resource('Labels', LabelsController::class);
    $router->resource('stockOrder', StockOrderController::class);
    $router->resource('stockstrades', StocksTradesController::class);
    $router->resource('userlabel',  UserLabelController::class);

    $router->resource('distributor',     DistributorController::class);

    $router->resource('address', AddressController::class);
    $router->resource('machines', MachinesController::class);
    $router->resource('machine_banner', MachineBannerController::class);
    $router->get('machine_good/{id}', 'MachineGoodController@index');
    $router->post('machine_good', 'MachineGoodController@store');
    $router->get('machine_order/{id}', 'MachineGoodController@machineOrder');

    $router->resource('grade', GradeController::class);
    $router->resource('address', AddressController::class);
    $router->resource('stock', StockController::class);
    $router->resource('suggestion', SuggestionController::class);
    //$router->post('search', 'DetailController@search');
});
